package elm

import (
	"awesomeProject2/write_line"
	"io/ioutil"
	"log"
)

func WriteFilePjElm() {
	files, err := ioutil.ReadDir("C:\\Users\\admin\\GolandProjects\\waimaigo\\json\\elm_pj\\")
	if err != nil {
		log.Fatal(err)
	}

	pjC := make([]string, 0)

	for _, file := range files {
		pj := GetPjElm("C:\\Users\\admin\\GolandProjects\\waimaigo\\json\\elm_pj\\" + file.Name())
		for _, comment := range pj.Data.Data.ShopCommentDetails {

			pjC = append(pjC, comment.RatingText)
		}
	}

	write_line.WriteLineTxm(pjC, "C:\\Users\\Admin\\go\\src\\awesomeProject2\\pj\\text_elm.txt")

}
